package com.qf.admin.controller;

import com.qf.admin.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("index")
    public String toIndex(Model model){
        model.addAttribute("goodsList" , goodsService.getAvaliableGoods());
        return "redirect:goods/list";
    }



}
